package com.banzhang.sort.mianshisan;

public class StringTablesTest {
    public static void main(String[] args) {
        String s1 = "a";
        String s2 = "b";
        String s3 = "ab";
        String s4 = s1 + s2;
        System.out.println(s3 == s4);
        String s5 = "a" + "b";
        String s6 = s4.intern();
        System.out.println(s3 == s5);
        System.out.println(s3 == s6);

        String x2 = new String("c") + new String("d");

        String x1 = "cd";
        System.out.println(x1 == x2);
        Math.round(11.3);
        x2.intern();
        System.out.println(x1 == x2);
    }
}
